/*
**将数字处理为以万为单位
@params  num  : number | string  默认值为0
*/
export const formateNum = (num = 0) => {
	num = Number(num)
		
	if(num >= 10000)  {
		return parseInt( num / 10000)
	}
	return num
}

/*
时间戳转换为202x-03-03的格式
参数params为毫秒数
*/
export const formateDate = (data,s = '-') => {
	if (!data) return ''
	let d = new Date(data)
	let y = d.getFullYear()
	let m = String(d.getMonth() + 1).padStart(2,'0')
	let date = String(d.getDate()).padStart(2,'0')
	return y+s+m+s+date
}